The default is to use snoop control.
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
* no-pv Disable IOMMU for PV domains (default)
* force|required Don't boot unless IOMMU is enabled
* passthrough Bypass VT-d translation for Dom0
+ * snoop Utilize the snoop control for IOMMU (default)
+ * no-snoop Dont utilize the snoop control for IOMMU
*/
custom_param("iommu", parse_iommu_param);
int iommu_enabled = 0;
{
char *ss;
iommu_enabled = 1;
+ iommu_snoop = 1;
do {
ss = strchr(s, ',');
force_iommu = 1;
else if ( !strcmp(s, "passthrough") )
iommu_passthrough = 1;
+ else if ( !strcmp(s, "snoop") )
+ iommu_snoop = 1;
+ else if ( !strcmp(s, "no-snoop") )
+ iommu_snoop = 0;
s = ss + 1;
} while ( ss );
/* Giving that all devices within guest use same io page table,
* enable snoop control only if all VT-d engines support it.
*/
- iommu_snoop = 1;
- for_each_drhd_unit ( drhd )
+ if ( iommu_snoop )
{
- iommu = drhd->iommu;
- if ( !ecap_snp_ctl(iommu->ecap) ) {
- iommu_snoop = 0;
- break;
+ for_each_drhd_unit ( drhd )
+ {
+ iommu = drhd->iommu;
+ if ( !ecap_snp_ctl(iommu->ecap) ) {
+ iommu_snoop = 0;
+ break;
+ }
}
}